let channelId;
window.onload=function (){
    channelId = getQuery("channelId")
}

function add() {
    axios.get("/post/add",{
        params: {
            title:$("title").value,
            content:$("content").value,
            channelId,channelId
        }
    }).then(resp=>{
        let info = resp.data;
        if(info == "ok"){
           $("errorDiv").innerHTML='已发表';
        }
    })
}
function back() {
    location.href="/channel.html?id="+channelId
}